<%@ Title= "" %>
  
<com:TContent ID="Main" >
<com:TClientScript ScriptUrl="assets/js/instantedit.js" ID="scriptElement" />
<com:TClientScript ScriptUrl="assets/js/subTest.js"/>
<script type="text/javascript" src="assets/js/prototype.js"></script>
<script type="text/javascript" src="assets/js/lightbox.js"></script>

<com:TPanel ID="navigatedUserCnt"  >
<ul id="tab_Menu" class="tabBoxes tabProfile">
	<li id="profile_tap" class="selected" view="Profile">
		<com:THyperLink Text="Profile" CssClass="tab_link"
    	NavigateUrl="<%= $this->Service->constructUrl('users.ProfileUser',array('id' => $this->id)) %>"
    	Visible="<%= !$this->User->IsGuest %>" /></li>
	<li id="friend_tap" class="">
		<com:THyperLink Text="Friends" CssClass="tab_link"
    	NavigateUrl="<%=  $this->Service->constructUrl('users.FriendsUser',array('id' => $this->id))  %>"
    	Visible="<%= !$this->User->IsGuest %>" /></li>
	<li id="books_tap" class=""><com:THyperLink Text="My Books" CssClass="tab_link"
    NavigateUrl="<%=  $this->Service->constructUrl('users.BooksUser',array('id' => $this->id))  %>"
    Visible="<%= !$this->User->IsGuest %>" /></li>
	<li id="image_tap" class=""><com:THyperLink Text="Images" CssClass="tab_link"
    NavigateUrl="<%=  $this->Service->constructUrl('users.ImageContainer',array('id' => $this->id))  %>"
    Visible="<%= !$this->User->IsGuest %>" />
	</li>
</ul>
</com:TPanel>
<div id="profile">

 <h1 class = "content"><span id="displayName" class="editText"><com:TLiteral ID="txtDisplayName" Text=""  /></span>'s Profile</h1> 
 <com:TImage  Height="50" Width="50" BorderColor="silver" BorderStyle="solid" BorderWidth="3px"
     ImageUrl="<%=$this->getAvatar($this->getCurrentRecord())%>" /><br>
	 
<com:TPanel ID="contentProfile" >
<p>
	<com:THyperLink ID="linkEditProfile" Text="Edit Profile" NavigateUrl="<%=  $this->Service->constructUrl('users.EditProfile')  %>"/>
</p>

 <com:TLiteral Text="ID: <%=$this->Request['id'] %>" 
	Visible="<%= !$this->User->IsGuest %>" />
  
 <br>

  <div id="commonProfile" style="display: block;" class="sidebar">   
  <br />


 <strong class = "content">Full name : </strong>   
 <com:TLiteral Text="<%=$this->getCurrentRecord()->first_name %> <%=$this->getCurrentRecord()->last_name %>" 
	Visible="<%= !$this->User->IsGuest %>" /> <br><br>
    
 <strong class = "content">Email : </strong>      
 <com:TLiteral Text="<%=$this->getCurrentRecord()->email %>" 
	Visible="<%= !$this->User->IsGuest %>" /> <br><br>
    
 <strong class = "content">Birth Date : </strong>      
 <com:TLiteral Text="<%=$this->getCurrentRecord()->birthDate %>" 
	Visible="<%= !$this->User->IsGuest %>" /> <br><br>
 
 <strong class = "content">Sex : </strong>      
 <com:TLiteral Text="<%=$this->getSexString($this->getCurrentRecord()->sex)  %>" 
	Visible="<%= !$this->User->IsGuest %>" /> <br><br>
</div>

   <br />
    <hr color="#333333" size="1" width="200" align="center"> 
	
  <div class="profile_box">
  <h3 class="profile_box_header"><%=$this->getCurrentRecord()->username %>'s Friends <com:TLabel ID="numFriend" Text="" /> </h3> 
  <div class="friendPhotoTable">
    
 <com:TRepeater ID="Repeater_friend"
    ItemRenderer="Application.pages.users.AvatarFriendRenderer"
    AllowPaging="true"
    AllowCustomPaging="true"
    PageSize="10"    />
  </div>
	<com:TPager ControlToPaginate="Repeater_friend" OnPageIndexChanged="pageChanged_friend" />
  <br>
 <com:TLabel ID="result" /><br>

 </div> <!-- end of friends div -->
<br />
 </com:TPanel>
 </div>
 <br>  
	<div id="activity">
		<com:TPanel ID="contentActivity" >
  	<div class="commentBoxContainer">

			<div class="commentBoxInformation">
				<h2 class = "content"><com:TLiteral ID="txtStatusHeader" /></h2>
			</div>
			<span id="userStatus" class="commentBox_TextArea" onclick="startEditInline();"  onmouseover="highlight(this);" onmouseout="unhighlight(this);" style="cursor: pointer"><com:TLiteral ID="txtUserStatus" Text="" /></span>
			
			<span id="edit" style="display: none;">
				<input id="txtUserStatus" type="text" onkeypress="return check('userStatus',event);"/>
				<div class="commentBox_Area">
					<input id="btnSave" class="common_btn_small" type="button" Value="Save" onclick="return saveData('userStatus');"/>
					<input class="common_btn_small" type="button" Value="Cancel" onclick="resetEditInline();"/>
				</div>
			</span>
		</div>
		
	<hr color="#333333" size="1" width="100%" align="center">	
  <h1 class = "content">Activity List</h1>  
  <br/>
  <h2 class = "content"><com:TLiteral Text="" ID="txtRecentActivity" /></h2> 
  <com:TRepeater ID="Repeater_activity"
    ItemRenderer="Application.pages.users.ActivityRenderer"
    AllowPaging="true"
    AllowCustomPaging="true"
    PageSize="5"    />
  <com:TPager ControlToPaginate="Repeater_activity" OnPageIndexChanged="pageChanged_activity" />
  <br>
  <com:TPanel ID="ownerInfoCnt">
  	<h2 class = "content">Friends updated activities (<%=$this->Repeater_friends_activity->VirtualItemCount %>)</h2> 
	<com:TRepeater ID="Repeater_friends_activity"
    ItemRenderer="Application.pages.users.ActivityRenderer"
    AllowPaging="true"
    AllowCustomPaging="true"
    PageSize="5"    />
	<com:TPager ControlToPaginate="Repeater_friends_activity" OnPageIndexChanged="pageChanged_friends_activity" />
  	<br />
  	
  <h2 class = "content">:: Someone requested you (<%=$this->Repeater_requested->VirtualItemCount %>) ::</h2> 
  <com:TRepeater ID="Repeater_requested"
    ItemRenderer="Application.pages.users.RequestRenderer"
    AllowPaging="true"
    AllowCustomPaging="true"
    PageSize="5"    />
 
	<com:TPager ControlToPaginate="Repeater_requested" OnPageIndexChanged="pageChanged_requested" />
  <br>
 <!--<strong><com:TLiteral Text=" <%=$this->Repeater_requested->VirtualItemCount %> request(s)"  ID="numReq22"
	Visible="true" /> </strong>-->
  
  <h2 class = "content">:: Made requests (<%=$this->Repeater->VirtualItemCount %>) ::</h2>    
  <com:TRepeater ID="Repeater"
    ItemRenderer="Application.pages.users.FriendReqRenderer"
    AllowPaging="true"
    AllowCustomPaging="true"
    PageSize="5"
    />
 
	<com:TPager ControlToPaginate="Repeater" OnPageIndexChanged="pageChanged" />
	</com:TPanel>
<br>

     <h2 class = "content">Add Comments </h2>
     
<com:TPanel CssClass="commentBoxContainer" DefaultButton="btnSubmitComment"> 
	<div class="commentBoxInformation">
		<h2 class="content">Add Comments</h2>
	</div>
	<com:TTextBox ID="taComment" CSSclass = "commentBox_TextArea"/>
	<div class="commentBox_Area">	
		<com:TButton CssClass="common_btn" Text="Submit" ID="btnSubmitComment" OnClick="btnCommentClicked" />
	</div>
</com:TPanel>

     <h2 class = "content">Comments </h2>
     <com:TRepeater ID="Repeater_ProfileComments"
    ItemRenderer="Application.pages.users.ProfileCommentRenderer"
    AllowPaging="true"
    AllowCustomPaging="true"
    PageSize="5"
    /><br /> 
	<com:TPager ControlToPaginate="Repeater_ProfileComments" OnPageIndexChanged="pageChanged_profile_comments" />
	</com:TPanel>
	<com:TPanel ID="restrictedUserCnt" >
	<com:TLiteral Text=""  ID="restrictTxt"/>
	<com:TButton ID="btnFriendReq" CssClass="common_btn" Text="Send Request" OnClick="buttonRequestedClicked"  /><br>
	</com:TPanel>
	</div>
	
 <br> 
 <div id="advertise">
 	THIS IS ADS CNT
 </div>
 <br> 

</com:TContent>
